import request from "@/utils/request";

export function getEmployees(paramters) {
  return request({
    url: "api/v1/employees",
    method: "get",
    params: paramters,
    basicDataServer: true,
  });
}


export function getEmployee(id) {
  return request({
    url: "api/v1/employees/"+id,
    method: "get",
    basicDataServer: true,
  });
}

export function addEmployee(data) {
  return request({
    url: "api/v1/employees",
    method: "post",
    data: data,
    basicDataServer: true,
  });
}

export function updateEmployee(data) {
  return request({
    url: "api/v1/employees",
    method: "put",
    data: data,
    basicDataServer: true,
  });
}

export function deleteEmployee(id) {
  return request({
    url: "api/v1/employees/" + id,
    method: "delete",
    basicDataServer: true,
  });
}